Find all five characters long word in a stringΒΆ
Find all five characters long word in a string.
import re
text = 'The quick brown fox jumps over the lazy dog.'
print(re.findall(r"\b\w{5}\b", text))
Output:
['quick', 'brown', 'jumps']
import re
text = 'The quick brown fox jumps over the lazy dog.'
print(re.findall(r"\b\w{5}\b", text))
Output:
['quick', 'brown', 'jumps']